<%--
SYSTEM NAME 	: 기술적보호조치표준서비스
PROGRAM ID 		: pesForm
PROGRAM NAME 	: 성능평가신청내역 조회
AUTHOR 			: 강평희
CREAT DATE 		: 2010-09-17
MODIFY DATE		: 
DESCRIPTION 	: 성능평가신청내역조회 화면
--%>
<%@ page language="java"
	import="java.sql.*,javax.sql.*,java.util.*,java.io.*,javax.naming.*"
	pageEncoding="UTF-8"%>
<%@ page import="com.markany.beans.util.*"%>
<%@ page import="com.markany.beans.src.MasterDao"%>
<%@ page import="com.markany.beans.property.*"%>
<%@ page import="org.apache.log4j.Logger"%>
<%@page import="com.dmail.beans.src.DmailDao"%>
<%@page import="java.net.URLEnTAB_CODEr"%>
<%@page import="java.net.URLDeTAB_CODEr"%>
<%@page import="com.oreilly.servlet.Base64EnTAB_CODEr"%>
<%@page import="sun.misc.BASE64DeTAB_CODEr"%>
<%@page import="com.oreilly.servlet.Base64DeTAB_CODEr"%>
<%! private Logger logger = Logger.getLogger(this.getClass().getName()); %>
<%
	//서버패스 잡기
	String ctxPath = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + ctxPath + "/ctis_mng";
	
	String PAGE = "pesForm";
	String DIR = "performance";
	String PAGE_NAME = "성능평가 신청 내역 조회 및 처리";
	String NAV = "Home > 성능평가 > 성능평가신청관리 > 성능평가 신청 내역 조회 및 처리";
%>
<%@ include file="/jsp/common/ctis_sessinc.jsp" %>
<jsp:useBean id="bean" class="com.markany.beans.util.PageBean" scope="page" />
<jsp:setProperty name="bean" property="*" />
<jsp:setProperty name="bean" property="intPageLine" value="10" />
<%
	String sql = "";
	String searchSqltx = "";
	int totalCnt = 0;
	int totalCount = 0;
	int totalCnt_memo = 0;
	
	String stat = hp.getString("LASTPROCSTAT","");
	String ftyp = hp.getString("formTYP","");
	String rno = hp.getString("RECEIPTNO","");
	String testGb = hp.getString("TESTGB","");
	
	String proSeq = hp.getString("procSeq","");
	
	String rptTyp = hp.getString("REPRTYPE","");
	String optinselectedpdf = "";
	String optinselectedexc = "";
	String optinselectedwrd = "";
	
	if( rptTyp.equals("pdf") ){
	
		optinselectedpdf = " selected";
		
	}
	else if(rptTyp.equals("xls")){
		
		optinselectedexc = " selected";
	}
	else if( rptTyp.equals("rtf") ){
		
		optinselectedwrd = " selected";
	}
	else{
		
		
	}
	
	MasterDao dao = null;
	MasterDao dao_c = null;
	MasterDao dao_r = null;
	MasterDao cod_r = null;
	MasterDao cod_v = null;
	
	Vector list = null;
	Vector list_r = null;
	Vector statList = null;
	Vector statListV = null;
	Vector memoList = null;
	
	MasterDao newDao = null;
	MasterDao cntDao = null;
	Vector fileLst = null;
	sql = "";
	String regDate = "";
	String file_size = "";
	String file_name = "";
	String[] fArr = null;

	String MyFileName = ""; 

	try{
		cod_r = new MasterDao();
		
		sql = " SELECT CD, CD_NM FROM TAB_CODE WHERE CD <> B_CD AND CD LIKE 'X4%' AND USE_YN = '1'\n ";
		if( stat.equals("X410") || stat.equals("X429")  ) sql += "  AND CD IN ( 'X420' , 'X419' ) ";
		if( stat.equals("X420") ) sql += "  AND CD IN ( 'X429' ) ";
		
		cod_r.setCommand(sql);
		
		statList = cod_r.getResultHashtableNoClose();
	
	
		dao = new MasterDao();

		sql = PassBundle_copyright.getString("SELECT_TAB_TEST_1_FORM");
		dao.setCommand(sql);
		
		dao.setObject(1,rno);
		
//		dao.close();
		list = dao.getResultHashtableNoClose();
		
		dao_c = new MasterDao();
		
		sql = "";
		sql = PassBundle_copyright.getString("SELECT_TAB_TEST_1_FORM_UNDER_LIST_COUNT");
		dao_c.setCommand(sql);
		
		dao_c.setObject(1,rno);
		
		totalCnt = dao_c.getTotalRowNoClose();
		dao_c.close();
		
		bean.setIntTotalRow(totalCnt);
		
		dao_r = new MasterDao();
		sql = "";
		sql = PassBundle_copyright.getString("SELECT_TAB_TEST_1_FORM_UNDER_LIST");
		dao_r.setCommand(sql);
		
		dao_r.setObject(1,rno);
		dao_r.setObject(2,(bean.getIntCurrentPage() * bean.getIntPageLine()));
		dao_r.setObject(3,(bean.getIntCurrentPage() - 1) * bean.getIntPageLine() + 1);
		dao_r.setObject(4,(bean.getIntCurrentPage() * bean.getIntPageLine()));
		
//		dao_r.close();
		list_r = dao_r.getResultHashtableNoClose();

		cntDao = new MasterDao();
		sql = "";
		sql += " SELECT COUNT(*) FROM TAB_TEST_1_MODULE WHERE RECEIPT_NO = '"+ rno + "'";
		cntDao.setCommand(sql);
		totalCount = cntDao.getTotalRowNoClose();
		cntDao.close();
		
		newDao = new MasterDao();
		sql = "";
		sql += " SELECT * FROM TAB_TEST_1_MODULE WHERE RECEIPT_NO = '"+ rno + "' ORDER BY UPLOAD_DAYTIME DESC";
		
		newDao.setCommand(sql);
		fileLst = newDao.getResultHashtableNoClose();
			
		newDao.close();
			
		
		
	} catch (Exception e) {
		logger.error(PAGE + " Exception e.toString()      : " + e.toString());
		logger.error(PAGE + " Exception e.getMessage()    : " + e.getMessage());
		logger.error(PAGE + " Exception strQuery  : \n" + sql);
	%>
	<SCRIPT LANGUAGE="JavaScript">
	<!--
		alert(' [<%=PAGE%>] : <%=e.toString().replace("\n","")%>')
	//-->
	</SCRIPT>
	<%
	} finally {
		dao.close();
		dao_r.close();
		cod_r.close();
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> 기술적보호조치 표준 서비스 :: </title>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META http-equiv="cache-control" content="no-cache, must-revalidate" />
<META http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<link rel="stylesheet" type="text/css" href="../css/contents.css" />
<link rel="stylesheet" type="text/css" href="../css/new.css" />

<script type="text/javascript" src="../js/gnb.js"></script>
<script language="JavaScript" src="../js/common.js" ></script>
<script type="text/javascript" src="../js/popupcalendar.js"></script>
<script type="text/javascript" src="../js/script.js"></script>
<script type="text/javascript" src="../js/ComUtil.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type = 'text/javascript' src="http://tmis.copyright.or.kr/printmade/server_files/Printmade2.js"></script>

<SCRIPT LANGUAGE="JavaScript">
<!--
	var f = document.all;
	
	function Page(page) {
		
		document.form.intCurrentPage.value = page;
		document.form.action = "pesResult.jsp";
		document.form.submit();
	}

	function search() {
		document.form.intCurrentPage.value = 1;
		document.form.action = "pesResult.jsp";
		document.form.submit();
	}

	function getDelete(delVal,g){
		
		
		if( !confirm("삭제하시겠습니까?") ){
			return;
		}
		
	
		var frm = document.form;
		//delKey = rceNo + "_" + procSeq ;
		var delArr = delVal.split("_");
		frm.testGb.value = g;
		frm.receipt_no.value = delArr[0];
		frm.proc_seq.value = delArr[1];
		
		frm.action = "perFormDelete.jsp";
		frm.submit();
	}
	
	function getDeleteA(delVal,fVal,testgb){
		
		if( !confirm("삭제하시겠습니까?") ){
			return;
		}
		
	
		var frm = document.form;
		frm.receipt_no.value = delVal;
		frm.fileSize.value = fVal;
		frm.allDel.value = "ok";
		frm.testGb.value = testgb;
		
		frm.action = "perFormDelete.jsp";
		frm.submit();
	}
	
	function addPes(t) {
		
		var stat = jQuery("#stat option:selected").val();
		if( stat == "" ){
			
			alert("신청처리 상태를 선택해 주세요!");
			document.form.stat.focus();
			return;
		}
		document.form.testGb.value = t;
		document.form.action = "addPesProcess.jsp";
		document.form.submit();
	}
	
	function upPwd(g) {
		
		
		if( f.PWD1.value != "" && f.PWD2.value != "" ){
			
			if(f.PWD1.value != "") {
			if(f.PWD1.value != f.PWD2.value){
				alert("비밀번호와 비밀번호 확인이 일치하지 않습니다. 다시 입력하여 주십시오");
				f.PWD1.focus();
				return;
			}
			}
			else {
				if(f.PWD1.value=="") {
					alert("비밀번호를 입력하여 주십시오 ");
					f.PWD1.focus();
					return;
				} else if(f.PWD2.value==""){
					alert("비밀번호확인를 입력하여 주십시오 ");
					f.PWD2.focus();
					return;
				}
			}
		
			if(chkPwd()){
				alert('비밀번호가 변경되었습니다.');	
				document.form.testGb.value = g;
				document.form.action = "pesFormUpdate.jsp";
				document.form.submit();
			}
			
		}
		else{
			document.form.testGb.value = g;
			document.form.action = "pesFormUpdate.jsp";
			document.form.submit();
		}
		
		
	}

	function chkPwd(){
		var invalid = " ";
		var chk_num = f.PWD1.value.search(/[0-9]/g); 
    	var chk_eng = f.PWD1.value.search(/[a-z]/ig); 
		
		if(chk_num < 0 || chk_eng < 0){ 
	        alert('비밀번호는 숫자와 영문자를 혼용하여야 합니다.'); 
	        f.PWD1.value="";
	        f.PWD2.value="";
	        f.PWD1.focus();
	        return false;
	    }
	    
	    if(/(\w)\1\1\1/.test(f.PWD1.value)){
	    	alert('비밀번호에 같은 문자를 4번 이상 사용하실 수 없습니다.'); 
	    	f.PWD1.value="";
	        f.PWD2.value="";
	        f.PWD1.focus();
	        return false;
	    }
	    
	    if (f.PWD1.value.length < 6) {
	    	alert("비밀번호는 최소 6자리 이상입니다  ");
			f.PWD1.value="";
	        f.PWD2.value="";
	        f.PWD1.focus();
			return false;
	    }
	    
	    if (f.PWD1.value.length > 15) {
			alert("비밀번호는 최소 15자리 이하입니다  ");
	        f.PWD1.value="";
	        f.PWD2.value="";
	        f.PWD1.focus();
			return false;
	    }
	    
	    if (f.PWD1.value.indexOf(invalid) > -1) {
			alert("비밀번호는 공백은 허용하지 않습니다 ");
	        f.PWD1.value="";
	        f.PWD2.value="";
	        f.PWD1.focus();
			return false;
	    }   
	    
	    return true;
	}  
	
	function fileDown(fileName,regDate){
		document.downForm.FILENAME.value = fileName;
		document.downForm.REGDATE.value = regDate;
		document.downForm.action = "./../../tpms/board/fileDownLoad.jsp?pageGubun=pesForm";
		document.downForm.submit();
	}
//-->
</SCRIPT>
</head>
<body>
<FORM METHOD="post" NAME="downForm" >
<input type="hidden" id="FILENAME" name="FILENAME" value=""/>
<input type="hidden" id="REGDATE" name="REGDATE" value=""/>
</FORM>
<form METHOD="POST" NAME="form">
<input type="hidden" name="intCurrentPage" value="<%=bean.getIntCurrentPage()%>"/>
<input type="hidden" name="receipt_no" value="<%=rno%>"/>
<input type="hidden" name="proc_seq" value=""/>
<input type="hidden" name="allDel" value=""/>
<input type="hidden" name="fileSize" value=""/>
<input type="hidden" name="testGb" value=""/>
<%@ include file="/ctis_mng/common/menu.jsp" %>
	<div id="contents">
	
			
			<%
				String receiptNO = "";		// 접수번호
				String resDATE = "";		//신청일시
				String bizNM = "";			//업체명
				String bizNO = "";			//사업자번호
				String ceoNM = "";			//대표자
				String bizAREA = "";		//사업분야
				String addrNO = "";			//주소_1(우편번호)
				String addr1 = "";			//주소_2(주소)
				String bizOP = "";			//대표전화번호
				String createYM = "";		//설립년월
				String tech_NM = "";		//책임자 성명
				String tech_email = "";		//책임자 이메일
				String tech_OP = "";		//책임자 연락처
				String tech_HP = "";		//책임자 핸드폰
				String programNM = "";		//프로그램명
				String useOS = "";			//대상 OS
				String programVER = "";		//버전
				String ftp_ip = "";	
				String ftp_port = "";
				String protocol = "";
				String ftp_id = "";
				String ftp_pass = "";
				String ftp_path = "";
				String pwd		= "";
				String homepage = "";
				String tech_dept = "";
				String tech_title = "";
				String tech_fax = "";
				String program_desc = "";
				String extract_nm = "";
				String recognize_nm = "";
				String subset_nm = "";
				String embedder_nm = "";
				String attack_test_yn = "";
				String attactkSTR = "";
				String receipt_memo = "";
				String audioYn = "";
				String videoYn = "";
				String imageYn = "";
				String avTestYn = "";
				
				String yyyy = "";
				String mm = "";
			
				if( list.size() > 0 )
				{
					for( int i=0; i<list.size() ; i++ )
					{
						receiptNO		= ((Hashtable) list.elementAt(i)).get("RECEIPT_NO") + "";
						resDATE			= ((Hashtable) list.elementAt(i)).get("RECEIPT_DATE") + "";
						bizNM			= ((Hashtable) list.elementAt(i)).get("BIZ_NM") + "";
						bizNO			= ((Hashtable) list.elementAt(i)).get("BIZ_NO") + "";
						ceoNM			= ((Hashtable) list.elementAt(i)).get("CEO_NM") + "";
						bizAREA			= ((Hashtable) list.elementAt(i)).get("BIZ_AREA") + "";
						addrNO			= ((Hashtable) list.elementAt(i)).get("ZIP_NO") + "";
						addr1			= ((Hashtable) list.elementAt(i)).get("ADDR1") + "";
						bizOP			= ((Hashtable) list.elementAt(i)).get("BIZ_OP") + "";
						createYM		= ((Hashtable) list.elementAt(i)).get("CREATE_YM") + "";
						tech_NM			= ((Hashtable) list.elementAt(i)).get("TECH_NM") + "";
						tech_email		= ((Hashtable) list.elementAt(i)).get("TECH_EMAIL") + "";
						tech_OP			= ((Hashtable) list.elementAt(i)).get("TECH_OP") + "";
						tech_HP			= ((Hashtable) list.elementAt(i)).get("TECH_HP") + "";
						programNM		= ((Hashtable) list.elementAt(i)).get("PROGRAM_NM") + "";
						programVER		= ((Hashtable) list.elementAt(i)).get("PROGRAM_VER") + "";
						useOS			= ((Hashtable) list.elementAt(i)).get("USE_OS") + "";
						ftp_ip			= ((Hashtable) list.elementAt(i)).get("FTP_IP") + "";
						ftp_port		= ((Hashtable) list.elementAt(i)).get("FTP_PORT") + "";
						protocol		= ((Hashtable) list.elementAt(i)).get("PROTOCOL") + "";
						ftp_id			= ((Hashtable) list.elementAt(i)).get("FTP_ID") + "";
						ftp_pass		= ((Hashtable) list.elementAt(i)).get("FTP_PASS") + "";
						ftp_path		= ((Hashtable) list.elementAt(i)).get("FTP_PATH") + "";
						pwd				= ((Hashtable) list.elementAt(i)).get("PWD") + "";
						homepage		= ((Hashtable) list.elementAt(i)).get("HOMEPAGE") + "";
						tech_dept		= ((Hashtable) list.elementAt(i)).get("TECH_DEPT") + "";
						tech_title		= ((Hashtable) list.elementAt(i)).get("TECH_TITLE") + "";
						tech_fax		= ((Hashtable) list.elementAt(i)).get("TECH_FAX") + "";
						program_desc	= ((Hashtable) list.elementAt(i)).get("PROGRAM_DESC") + "";
						extract_nm		= ((Hashtable) list.elementAt(i)).get("EXTRACT_NM") + "";
						recognize_nm	= ((Hashtable) list.elementAt(i)).get("RECOGNIZE_NM") + "";
						subset_nm		= ((Hashtable) list.elementAt(i)).get("SUBSET_NM") + "";
						embedder_nm		= ((Hashtable) list.elementAt(i)).get("EMBEDDER_NM") + "";
						attack_test_yn	= ((Hashtable) list.elementAt(i)).get("ATTACK_TEST_YN")+"";
						receipt_memo	= ((Hashtable) list.elementAt(i)).get("RECEIPT_MEMO")+"";
						audioYn			= ((Hashtable) list.elementAt(i)).get("AUDIO_TEST_YN")+"";
						videoYn			= ((Hashtable) list.elementAt(i)).get("VIDEO_TEST_YN")+"";
						imageYn			= ((Hashtable) list.elementAt(i)).get("IMAGE_TEST_YN")+"";

						
					}
					
					if(!bizNO.equals(""))
					{
						if( bizNO.length() == 10 )
						{
							String A1 = bizNO.substring(0,3);
							String A2 = bizNO.substring(3,5);
							String A3 = bizNO.substring(5,10);
							
							bizNO = A1 + "-" + A2 + "-" + A3;	
						}
						
					}
					
					if(!createYM.equals(""))
					{
						yyyy = createYM.substring(0,4);
						if( createYM.length() > 5 )
							mm   = createYM.substring(4,6);
						else
							mm   = "00";
							
						createYM = yyyy +" 년" + mm + " 월";
					}
					
					
					if( attack_test_yn.equals("N") ){
						
						attactkSTR = "아니오";
					}
					else{
						attactkSTR = "예";
					}
					
					/*
					if( audioYn.equals("Y") && videoYn.equals("Y") ){
						
						avTestYn = "오디오 , 비디오";
					}
					else if( audioYn.equals("Y") && videoYn.equals("N")  ){
						
						avTestYn = "오디오";
					}
					else if(  audioYn.equals("N") && videoYn.equals("Y") ){
						
						avTestYn = "비디오";
					}
					else{
						avTestYn = "";
					}
					*/
					
					String tempStr = audioYn.replace("Y", "오디오 , ").replace("N", "") + videoYn.replace("Y", "비디오 , ").replace("N", "") + imageYn.replace("Y", "이미지 , ").replace("N", "");
					
					if(!tempStr.trim().isEmpty()){
						avTestYn = tempStr.substring(0, tempStr.lastIndexOf(",")).trim();
					}
					
					MyFileName = "pesresultRepot" + "_" + rno + "_" + testGb + "_" + avTestYn +"_"+ bizNO + "_" + resDATE;
					
				}	
			
			 %>
			 <h3 class="h_title">◆ 신청내역</h3>
			 <table class="checkTable">
			 	<tr>
					<th width="100">접수번호 </th>
					<td width="200">
						<%=receiptNO %>
					</td>
					<th width="100">신청일</th>
					<td width="200">
						<%=resDATE %>
					</td>
				</tr>
				<tr>
					<th>새 비밀번호 입력</th>
					<td>
						<input type="hidden"  name="PWD" value="<%=pwd %>"/><input type="password" name="PWD1" id="PWD1" maxlength="15" class="w113"/>
					</td>
					<th>새 비밀번호 확인</th>
					<td>
						<input type="password" name="PWD2" id="PWD2" maxlength="15" class="w113"/>
					</td>
				</tr>
				<tr>
					<th>메모</th>
					<td colspan="3">
						<textarea id="receipt_memo" name="receipt_memo" rows="50" style="width:550px;"><%=receipt_memo%></textarea>
					</td>
				</tr>
			 </table>
			 <table><tr><td>&nbsp;</td></tr></table>
			<center><a href="javascript:upPwd('<%=testGb %>')"><img src="../images/btn_change2.gif"/></a></center>
			 <h3 class="h_title">◆ 회사정보</h3>
			 <table class="checkTable">	
				<tr>
					<th width="110">회사(기관명)</th>
					<td colspan="1">
						<%=bizNM %>
					</td>
					<th>사업자번호</th>
					<td>
						<%=bizNO %>
					</td>
				</tr>
				<tr>	
					<th width="110">대표자</th>
					<td width="220">
						<%=ceoNM %>
					</td>
					<th>홈페이지</th>
					<td colspan="1">
						<%=homepage %>
					</td>
				</tr>
<%--				<tr>--%>
<%--					<th>사업분야</th>--%>
<%--					<td colspan="3">--%>
<%--						<%=bizAREA %>--%>
<%--					</td>--%>
<%--				</tr>--%>
				<%
		        	if( ! addrNO.equals("") && ! addr1.equals("") )
		        	{
		        %>
		        <tr>
		        	<th rowspan="2"><label for="zip_no">주소</label></th>
		            <td class="text" colspan="3">
		            	<%=addrNO %>
		            </td>
		        </tr>
		        <tr>
		            <td class="text" colspan="3">
						<%=addr1 %> 
					</td>
		        </tr>
		        <%}else{ %>
		         <tr>
		        	<th scope="row"><label for="zip_no">주소</label></th>
		            <td class="text" colspan="3">&nbsp;</td>
		        </tr>
		        <%} %>
<%--		       <tr>--%>
<%--					<th>전화번호</th>--%>
<%--					<td>--%>
<%--						<%=bizOP %>--%>
<%--					</td>--%>
<%--					<th  width="110">설립연월</th>--%>
<%--					<td  width="220">--%>
<%--						<%=createYM %>--%>
<%--					</td>--%>
<%--				</tr>--%>
				</table>
				<table><tr><td>&nbsp;</td></tr></table>
				<h3 class="h_title">◆ 업무 담당자 정보</h3>
				<table class="checkTable">
				<tr>
					<th width="110">성명</th>
					<td>
						<%=tech_NM %>
					</td>
					<th width="110">부서/직급</th>
					<td>
						<%=tech_dept %>&nbsp;/&nbsp;<%=tech_title %> 
					</td>
				</tr>  
				<tr>
					<th>전화번호</th>
					<td>
						<%=tech_OP %>
					</td>
					<th>핸드폰</th>
					<td>
						<%=tech_HP %>
					</td>
				</tr>
				<tr>
					<th width="110">FAX</th>
					<td width="220" colspan="3">
						<%=tech_fax %>
					</td>
				</tr>
				<tr>  	
					<th width="110">이메일</th>
					<td width="220" colspan="3">
						<%=tech_email %>
					</td>
				</tr>
				
				</table>
				<table><tr><td>&nbsp;</td></tr></table>
				<h3 class="h_title">◆ 평가대상정보</h3>
				<table class="checkTable">
				<tr>
					<th width="110">프로그램명</th>
					<td colspan="1">
						<%=programNM %>
					</td>
					<th width="110">버전</th>
					<td width="220">
						<%=programVER %>
					</td>
				</tr>
				<tr>
					<th>개요및특성</th>
					<td colspan="3">
						<%=program_desc %>
					</td>
				</tr>
				<%if(testGb.equals("FF")){ %>
				<tr>	
					<th width="110">추출모듈명칭</th>
					<td width="220" colspan="3">
						<%=extract_nm  %>
					</td>
				</tr>
				<tr>
					<th width="110">인식모듈명칭</th>
					<td width="220" >
						<%=recognize_nm  %>
					</td>
					<th width="110">부분매칭모듈명칭</th>
					<td width="220" >
						<%=subset_nm  %>
					</td>
				</tr>
				<%}else{ %>
				<tr>
					<th width="110">삽입모듈명칭</th>
					<td width="220" colspan="3">
						<%=embedder_nm  %>
					</td>
				</tr>
				<tr>	
					<th width="110">추출모듈명칭</th>
					<td width="220" colspan="3">
						<%=extract_nm  %>
					</td>
				</tr>
				<tr>	
					<th width="110">공모공격평가여부</th>
					<td width="220" colspan="3">
						<%=attactkSTR  %>
					</td>
				</tr>
				<%} %>
				
				</table>
				<table><tr><td>&nbsp;</td></tr></table>
				<%if(testGb.equals("FF")){ %>
				<h3 class="h_title">◆ 특징정보파일업로드정보</h3>
				<table class="checkTable">
				<tr>
					<th width="110">PROTOCOL</th>
					<td colspan="3">
						<%=protocol %>
					</td>
				</tr>
				<tr>
					<th width="110">IP</th>
					<td>
						<%=ftp_ip %>
					</td>
					<th width="110">PORT</th>
					<td>
						<%=ftp_port %>
					</td>
				</tr>
				<tr>
					<th>ID</th>
					<td>
						<%=ftp_id %>
					</td>
					<th width="110">PASSWORD</th>
					<td width="220">
						<%=ftp_pass %>
					</td>
				</tr>
				<tr style="display: none">
					<th>PROTOCOL</th>
					<td colspan="3">
						<%=protocol%>
					</td>
				</tr>
				<tr style="display: none">	
					<th width="110">PATH</th>
					<td colspan="3">
						<%=ftp_path %>
					</td>
				</tr>
				</table>
				<%} %>
				<table><tr><td>&nbsp;</td></tr></table>
				<h3 class="h_title">※ 업로드 파일</h3>
				<p id="searchWord" class="main_text_1">
					<span class="word"><%=totalCount%> 건</span>이 검색되었습니다.
				</p>
				<table class="bgTable2">
					<tr>
						<th width="40">순번</th>
						<th width="100">일시</th>
						<th width="100"><p><span>|</span>파일사이즈</p></th>
						<th width="250"><p><span>|</span>파일명</p></th>
						<th width="80"><p><span>|</span>다운</p></th>
					</tr>
					
					<% 
					int fileUpsize = 0;
					if(fileLst != null && fileLst.size() > 0){
				    	int bnoF = 0;
						int CNumF = bean.getIntCurrentPage() ;
						String downfilePath = "";
						String downfilename = "";
						fileUpsize = fileLst.size();
						for(int i=0;i<fileLst.size();i++){
							bnoF		= (totalCount- (CNumF-1)*10) - i;
							regDate		= ((Hashtable) fileLst.elementAt(i)).get("UPLOAD_DAYTIME") + "";
							file_name	= ((Hashtable) fileLst.elementAt(i)).get("FILE_NAME") + "";
							file_size	= ((Hashtable) fileLst.elementAt(i)).get("FILE_SIZE") + "";
							
							if( ! file_name.equals("") ){
								
								fArr = file_name.split("@");
								downfilename = String.valueOf(fArr[1]);
							}
							
							
							
				 %>
				 <tr>
				 	<td><%=bnoF %></td>
				 	<td><%=regDate %></td>
				 	<td><%=StringUtils.addComma(file_size)%> Byte</td>
				 	<td><%=downfilename %></td>
				 	<td><a href="javascript:fileDown('<%=downfilename %>','<%=regDate %>');" onfocus="this.blur();">다운</a></td>
				 </tr>
				 <%}}else{ %>	
				 	<tr>
						<td colspan="5">데이터가 없습니다.</td>
					</tr>
				 
				 <%} %>
				 
				</table>
				<table><tr><td>&nbsp;</td></tr></table>
				<h3 class="h_title">◆ 신청처리</h3>
				<table class="checkTable">
				<tr>
					<th width="200">상태변경</th>
					<%
						cod_v = new MasterDao();
						sql = "";
						sql = " SELECT CD_NM FROM TAB_CODE WHERE B_CD = 'X400' AND CD ='" + stat + "'";
						cod_v.setCommand(sql);
						
						statListV = cod_v.getResultHashtableNoClose();
						String TAB_CODE_nmV = "";
						for( int i=0;i<statListV.size();i++ )
						{
							TAB_CODE_nmV = ((Hashtable) statListV.elementAt(i)).get("CD_NM") + "";
						}
				
					
						cod_v.close();
					
						if( !ftyp.equals("ADD") )
						{
					 %>
						<td class="p10" width="250px" >
							<select name="stat" id="stat" size="1">
								<option value="" >--선택--</option>
								<%
								if (statList.size() > 0)
								{
									String optionSelected = "";
									String TAB_CODE_cd = "", TAB_CODE_nm = "";
									
									for (int i=0; i<statList.size(); i++)
									{
										TAB_CODE_cd = ((Hashtable) statList.elementAt(i)).get("CD") + "";
										TAB_CODE_nm = ((Hashtable) statList.elementAt(i)).get("CD_NM") + "";
										optionSelected = "";
										if (stat.equals(TAB_CODE_cd)){
											optionSelected = " selected";
										}
										%>
										<option value="<%=TAB_CODE_cd%>" <%=optionSelected%> ><%=TAB_CODE_nm%></option>
										<%
									}
								}
								%>
								
							</select>
						</td>
						<th width="200">현재상태</th>
					 	 <td width="250px"><%=TAB_CODE_nmV %></td>
					<%
						}
						else
						{
										
					 %>
					 <td width="250px" colspan="3"><%=TAB_CODE_nmV %> </td>
					
					 <%}%>
					 	
					  
				</tr>
				<tr>
					<th>메모</th>
					<%
						if( !ftyp.equals("ADD") )
						{
					 %>
					<td>
						<textarea id="memoStr" name="memoStr" rows="50" style="width:500px;"></textarea>
					</td>
					<td colspan="2">
						<div class="buttonR" >
							<a href="javascript:addPes('<%=testGb %>');" onfocus="this.blur();" ><img src="<%=basePath%>/images/btn_add.gif" width="55" height="25" alt="승인처리..." align="absmiddle"/></a>
						</div>
					</td>
					<%
						}
						else
						{
							cod_v = new MasterDao();
							sql = "";
							sql = " SELECT MEMO FROM TAB_TEST_1_HIST WHERE RECEIPT_NO ='" + rno + "' AND PROC_SEQ = '" + proSeq + "'";
							cod_v.setCommand(sql);
							
							memoList = cod_v.getResultHashtableNoClose();
							String memo = "";
							for( int i=0;i<memoList.size();i++ )
							{
								memo = ((Hashtable) memoList.elementAt(i)).get("MEMO") + "";
							}
						
							
							cod_v.close();
					%>
					 <td colspan="3"><%=memo %></td>
					 <%
					 }
					  %>
				</tr>
				</table>
				<table><tr><td>&nbsp;</td></tr></table>
				<h3 class="h_title">◆ 처리이력</h3>
				<p id="searchWord" class="main_text_1">
					<span class="word"><%=totalCnt%> 건</span>이 검색되었습니다.
				</p>
				<table class="bgTable2">
					<tr>
						<th width="40">순번</th>
						<th width="100">일시</th>
						<th width="100"><p><span>|</span>상태</p></th>
						<th width=""><p><span>|</span>메모</p></th>
						<th width="80"><p><span>|</span>삭제</p></th>
					</tr>
					<%
						String procDate = "";
						String procStat = "";
						String memo = "";
						String no = "";
						String rceNo = "";
						String procSeq = "";
						String delKey = "";
						String cdNM = "";
						int bno = 0;
					    int CNum = bean.getIntCurrentPage() ;
					    
					    String lastFlag = "";
					    
						if( list_r.size() > 0 )
						{
							for( int i=0;i<list_r.size();i++ )
							{	
								bno				= (totalCnt- (CNum-1)*10) - i;	
								no				= ((Hashtable) list_r.elementAt(i)).get("RNO")+"";	
								procDate		= ((Hashtable) list_r.elementAt(i)).get("PROC_DATE") + "";
								procStat		= ((Hashtable) list_r.elementAt(i)).get("PROC_STATUS") + "";
								memo			= ((Hashtable) list_r.elementAt(i)).get("MEMO") + "";
								rceNo			= ((Hashtable) list_r.elementAt(i)).get("RECEIPT_NO") + "";
								procSeq			= ((Hashtable) list_r.elementAt(i)).get("PROC_SEQ") + "";
								cdNM			= ((Hashtable) list_r.elementAt(i)).get("CD_NM") + "";
								
								
								delKey = rceNo + "_" + procSeq ;
								
																	
					 %>
					 <tr>
					 	<td><%=bno%></td>	
					 	<td><%=procDate%></td>
					 	<td><%=cdNM%></td>
					 	<td><%=memo%></td>
					 	<td>
					 	<%
					 	 if( bno == list_r.size() )
					 	 {
					 	 %>
					 	 <a href="javascript:getDelete('<%=delKey%>','<%=testGb %>')" onfocus="this.blur();"><img src="../images/btn_del.gif" align="absmiddle"/></a>
					 	 <%
					 	 }
					 	  %>
					 	  </td>
					 </tr>	
					 	
					 <%
							}
						} else { 
					  %>
					  	<tr>
							<td colspan="5">데이터가 없습니다.</td>
						</tr>
					<%	
					}
					%>
				</table>
				
		<div class="buttonC">
			<a href="javascript:getDeleteA('<%=rno%>','<%=fileUpsize %>','<%=testGb %>')" onfocus="this.blur();"><img src="../images/btn_delete.gif" align="absmiddle"/></a>
			<%if(testGb.equals("FF")){ %>
			<a href="pesResult.jsp?testGb=FF" onfocus="this.blur();"><img src="../images/btn_list.gif" align="absmiddle" alt="성능평가 신청 목록으로.."/></a>
			<%}else{ %>
			<a href="pesResultWF.jsp?testGb=WF" onfocus="this.blur();"><img src="../images/btn_list.gif" align="absmiddle" alt="성능평가 신청 목록으로.."/></a>
			<%} %>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<tr>
				<th>보고서타입선택</th>
				&nbsp;
	            <td align="left" >
	                <select name="reptTyp" id="reptTyp" size="1" >
						<option value="all" >--선택--</option>
						<option value="pdf" <%=optinselectedpdf %> >PDF</option>
						<option value="rtf" <%=optinselectedwrd %> >WORD(rtf)</option>
					</select>
	                <a href="javascript:toReport('<%=MyFileName %>','<%=testGb %>','pesForm');"><img src="../images/btn_15.gif" align="absmiddle" alt="레포트결과"/></a>
                </td>
			</tr> 
	        <a href = "#" onClick = "PTMPrintWebPage({frame_name:''})"/><img src="../images/btn_print.gif"  align="absmiddle" alt="성능평가 신청 목록으로.."/></a>
		</div>
			</div>
			<table><tr><td>&nbsp;</td></tr></table>
			
			</form>
			
	<div id="footer">
		<img src="../images/common/copyright.gif" width="253" height="12" alt="" />
	</div>
	<!-- //footer -->
  </body>
 </html>
 <form name="jasperform" method="post" >
 	<input type="hidden" name="rtType"/>
 	<input type="hidden" name="FILENAME"/>
 	<input type="hidden" name="testgb"/>
 	<input type="hidden" name="wrdtyp"/>
 	<input type="hidden" name="rpttyp"/>
 </form> 			
 
  </body>
</html>

<script type="text/javascript">

	function toReport(f,g,typ){
		
		
		
		var reptTyp = jQuery('#reptTyp option:selected').val();
		if( reptTyp != null ){
			document.jasperform.rpttyp.value = reptTyp;
		}
		document.jasperform.FILENAME.value = f;
		document.jasperform.testgb.value = g;
		document.jasperform.wrdtyp.value = typ;
		document.jasperform.action = "../pes/jasperCreate.jsp";
		document.jasperform.submit();
		
		
	}			

</script>
